package com.example.ymm.modules1.service.user;

import com.example.ymm.base.BaseService;
import com.example.ymm.model.TableList;
import com.example.ymm.model.YmPageDto;
import com.example.ymm.modules1.entity.my.user.DbApprovalLog;
import com.example.ymm.modules1.query.DbApprovalLogQueryCriteria;
import com.example.ymm.modules1.service.dto.heng.*;

import java.util.List;

public interface DbApprovalLogService extends BaseService<DbApprovalLog> {


    TableList<DbApprovalLog> list(DbApprovalLogQueryCriteria criteria, YmPageDto ymPage);

    List<DbApprovalLog> queryAll(DbApprovalLogQueryCriteria criteria);


    DbApprovalLog getApproveNo(String approveNo);



    /**
     * 业务员提成 发起前查看审批人
     * @param
     * @return
     */
    ApprovalCreateViewDto approvalCreateView(String approvalName,String title);

    /**
      提起审批
     */
    void approvalSubmit(String approveNo, String approvalName, YwBaseCreateDto dto);


    ApprovalCreateViewDto approvalLogView(String approveNo,String approvalName);

    /**
     提起人撤回
     */
    void approvalCancel(String approveNo,String approvalName);

    /**
     审批通过
     */
    void approvalPass(YwApprovaPassDto dto,String approvalName);
    /**
     审批驳回
     */
    void approvalBack(YwApprovaPassDto dto,String approvalName);


    void testApprovaAllPassFn();

    void for_each_test();


    ApprovalButtonShowDto approveButtonShow(String approveNo);


    /**
     * ---------------钟部----------
     */
    TableList<DbApprovalLog> ywDeptTotalList(DbApprovalLogQueryCriteria criteria, YmPageDto ymPage);


    /**
     * 审批人数据替换
     * 正在审批中的部门
     * oldUserName 旧审批人
     * newUserName 新审批人
     */
    void applyUserChange(List<String> deptNoIn,String oldUserName,String newUserName,String approveNo);



    void testChangeUser1();

    void testChangeUser2();



    /**
     * 用来做鑫福通的单据追溯
     * 查找当月审批通过 人员的单号
     * @param criteria
     * @return
     */
    String getPassApproveNoByUserName(DbApprovalLogQueryCriteria criteria);
}
